package j07jiekou;

public class J2 {
}

interface IEat{
    public abstract void eat();
}

interface ISay{
    public abstract void say();
}
class Person{
    String name;
}
class Hero extends Person implements IEat,ISay{
    public void eat() {
        System.out.println("吃东西");
    }

    @Override
    public void say() {
        System.out.println("ASDF");
    }
}

class HeroTest{
    public static void main(String[] args) {
        Hero hero = new Hero();
        hero.eat();
        hero.say();

        System.out.println("====");
        IEat e1 = new Hero();
        e1.eat();
        //接口多态
        Hero h1 = (Hero)e1;
        h1.say();

    }
}